package info.magnolia.blossom.sample.cv.components;

import info.magnolia.module.blossom.annotation.TabFactory;
import info.magnolia.module.blossom.annotation.Template;
import info.magnolia.module.blossom.annotation.TemplateDescription;
import info.magnolia.module.blossom.dialog.TabBuilder;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created with IntelliJ IDEA.
 * User: valentinzuld
 * Date: 2/28/13
 * Time: 12:54 PM
 * To change this template use File | Settings | File Templates.
 */
@Template(title = "Welcome", id = "blossomSample:components/welcome")
@TemplateDescription("welcome screen template")
@Controller
public class WelcomeComponent {

    @RequestMapping("/cvtemplate/welcome")
    public String render(){
        return "components/welcome.jsp";
    }

    @TabFactory("Content")
    public void contentTab(final TabBuilder tab) {
        tab.addEdit("headline", "Headline", "Page Headline");
        tab.addFckEditor("text", "Text", "description text");
    }
}
